package com.xdcplus.web.service.minio;

import io.minio.GetObjectResponse;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

/**
 * @Description 文件服务
 * @Author Devin.sang
 * @Date 2023/5/7 16:23
 */
public interface MinioService {

    String uploadFile(MultipartFile file);

    String previewFile(String filename);


    GetObjectResponse pullFile(String filename) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;

    void downloadFile(String filename, HttpServletResponse response);

    String previewFile(String bucket,String filename);

    String uploadText(String message);



}
